﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CDB.LinqModel.Data;


namespace CDB.LinqModel
{
    public partial class State
    {
        #region Variable Declaration
        private IDataRepository _dataObject;
        #endregion

        public State(IDataRepository dataObject)
            : this()
        {
            _dataObject = dataObject;
        }
        public List<State> GetAllStates()
        {
            return _dataObject.GetAllStates();
        }
        public List<City> GetCitiesByStateId(int stateId)
        {
            return _dataObject.GetCitiesByStateId(stateId);
        }
        public List<State> GetStatesByCountryId(int countryId)
        {
            return _dataObject.GetStatesByCountryId(countryId);
        }
    }
}
